package com.gy.componit;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.awt.*;

/**
 * 队伍
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Team {

    private Color teamColor;
    // 队伍地块颜色
    private Color teamPlotColor;
    // 炮台颜色
    private Color batteryColor;

    public Team(Color teamColor) {
        this.teamColor = teamColor;
        teamPlotColor = teamPlotColor == null ? teamColor.brighter() : teamPlotColor;
        batteryColor = batteryColor == null ? teamColor.darker() : batteryColor;
    }
}
